<template>
	<view class="content">
		<map style="width: 100%; height: 100%;" :latitude="latitude" :longitude="longitude" :scale="17" :markers="covers" :show-location="true" :enable-satellite="true">
		</map>
	</view>
</template>

<script>
	//:min-scale="17" 
	export default {
		data() { 
			return {
				id:0,
				title: 'map', 
				latitude: 32.037517,
				longitude: 120.581355,  
				covers: []
			} 
		},
		onLoad(option) {
		    var positionResult = option.positionResult.substring(0,4); 
			uni.request({
				url: 'https://api.zlkj-port.com/szgjapi/zlzg/Q/O03PRYMsM5l0PM5?position=' + positionResult,
				method: "get", 
				success: (res) => {
					 let marker={
					 	latitude:res.data.rows[0].X,
					 	longitude: res.data.rows[0].Y,
					 	iconPath: '../../static/img/position.png'
					 }
					 this.covers.push(marker);
				}
			})
			 
		},
		methods: {

		}
	}
</script>

<style>
	.content {
		text-align: center;
		height: 1100upx; 
	}
</style>
